/*
 * @Author: 悦者生存 1002783067@qq.com
 * @Date: 2023-11-02 20:59:31
 * @LastEditors: 悦者生存 1002783067@qq.com
 * @LastEditTime: 2023-11-05 22:43:59
 * @FilePath: /koa2-ts-template/src/common/swagger-extra/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export const AUTH_KEY = 'authorization';

export function registerExtraComponents(registry: any) {
  registry.registerComponent('securitySchemes', 'authorization', {
    type: 'apiKey',
    name: 'authorization',
    in: 'header',
  });

  registry.registerComponent('schemas', 'ExtraSchemasA', {
    type: 'object',
    properties: {
      id: {
        type: 'string',
      },
    },
  });
}
